<?php
/**
 * XmuSlh, web platform of Student Association Federation of Xiamen University
 * 
 * Rewritting one or some pages of StatusNet. 
 * To get the original version, please visit <http://status.net/>.
 * 
 * StatusNet, the distributed open-source microblogging tool
 * 
 * LICENCE: This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

/**
 * Widgets for displaying a navigation list at the top.
 * 
 * The guidances of Micronews, notenews, download, or so on.
 * 
 * @author		ytukie <ytukie@gmail.com>
 * @version		0.1
 */

// XmuSlh only.
if ( !defined('XMUSLH')) { exit(1); }

// Requirements.
require_once INSTALLDIR . '/lib/slh_widget.php';
require_once INSTALLDIR . '/lib/slh_util.php';

class GuideTopnav extends Widget
{
	/**
	 * Constructor.
	 */
	function __construct($out = null, $anything = array())
	{
		parent::__construct($out);
	}
	
	/**
	 * Show the options of the nav.
	 */
	function show()
	{
		$this->out->elementStart('dl', array('id' => 'topnav_guide'));
		$this->out->element('dt', null, '浏览些什么呢亲?');
		
		$this->out->elementStart('dd');
		$this->out->elementStart('ul');
			$this->out->elementStart('li', array('class' => 'nav1'));
			$this->out->element('a', array('href' => slh_action2url('publicnews')), 
								'新鲜事');
			$this->out->elementEnd('li');
			
			$this->out->elementStart('li', array('class' => 'nav2'));
			$this->out->element('a', array('href' => slh_action2url('showassociationuser')), 
								'社团™');
			$this->out->elementEnd('li');
			
			$this->out->elementStart('li', array('class' => 'nav3'));
			$this->out->element('a', array('href' => slh_action2url('eventnews')), 
								'活动');
			$this->out->elementEnd('li');
			
			$this->out->elementStart('li', array('class' => 'nav4'));
			$this->out->element('a', array('href' => slh_action2url('notenews')), 
								'记事');
			$this->out->elementEnd('li');
			
			$this->out->elementStart('li', array('class' => 'nav5'));
			$this->out->element('a', array('href' => slh_action2url('data')), 
								'下载');
			$this->out->elementEnd('li');
			
			$this->out->elementStart('li', array('class' => 'nav6'));
			$this->out->element('a', array('href' => slh_action2url('showphotoset')),
								'相册');
			$this->out->elementEnd('li');
		$this->out->elementEnd('ul');
		$this->out->elementEnd('dd');
		
		$this->out->elementEnd('dl');
	}
}

?>